/*
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
 * All portions are Copyright (C) 2008-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************
*/
package org.openbravo.model.ad.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.openbravo.base.structure.ActiveEnabled;
import org.openbravo.base.structure.BaseOBObject;
import org.openbravo.base.structure.ClientEnabled;
import org.openbravo.base.structure.OrganizationEnabled;
import org.openbravo.base.structure.Traceable;
import org.openbravo.model.ad.access.User;
import org.openbravo.model.ad.module.Module;
import org.openbravo.model.ad.system.Client;
import org.openbravo.model.common.enterprise.Organization;
/**
 * Entity class for entity ADReferencedTreeField (stored in table ad_ref_tree_field).
 *
 * NOTE: This class should not be instantiated directly. To instantiate this
 * class the {@link org.openbravo.base.provider.OBProvider} should be used.
 */
public class ReferencedTreeField extends BaseOBObject implements Traceable, ClientEnabled, OrganizationEnabled, ActiveEnabled {
    private static final long serialVersionUID = 1L;
    public static final String TABLE_NAME = "ad_ref_tree_field";
    public static final String ENTITY_NAME = "ADReferencedTreeField";
    public static final String PROPERTY_ID = "id";
    public static final String PROPERTY_REFTREE = "refTree";
    public static final String PROPERTY_CLIENT = "client";
    public static final String PROPERTY_ORGANIZATION = "organization";
    public static final String PROPERTY_MODULE = "module";
    public static final String PROPERTY_NAME = "name";
    public static final String PROPERTY_PROPERTY = "property";
    public static final String PROPERTY_CENTRALMAINTENANCE = "centralMaintenance";
    public static final String PROPERTY_SORT = "sort";
    public static final String PROPERTY_FILTER = "filter";
    public static final String PROPERTY_SEARCHINSUGGESTIONBOX = "searchinsuggestionbox";
    public static final String PROPERTY_SHOWINGRID = "showingrid";
    public static final String PROPERTY_RECORDSORTNO = "recordSortNo";
    public static final String PROPERTY_ACTIVE = "active";
    public static final String PROPERTY_CREATIONDATE = "creationDate";
    public static final String PROPERTY_CREATEDBY = "createdBy";
    public static final String PROPERTY_UPDATED = "updated";
    public static final String PROPERTY_UPDATEDBY = "updatedBy";
    public static final String PROPERTY_SHOWINPICKLIST = "showinpicklist";
    public static final String PROPERTY_ADREFERENCEDTREEVALUEFIELDIDLIST = "aDReferencedTreeValuefieldIDList";
    public static final String PROPERTY_ADREFERENCEDTREEDISPLAYFIELDIDLIST = "aDReferencedTreeDisplayfieldIDList";

    public ReferencedTreeField() {
        setDefaultValue(PROPERTY_CENTRALMAINTENANCE, true);
        setDefaultValue(PROPERTY_SORT, false);
        setDefaultValue(PROPERTY_FILTER, false);
        setDefaultValue(PROPERTY_SEARCHINSUGGESTIONBOX, false);
        setDefaultValue(PROPERTY_SHOWINGRID, false);
        setDefaultValue(PROPERTY_ACTIVE, true);
        setDefaultValue(PROPERTY_SHOWINPICKLIST, false);
        setDefaultValue(PROPERTY_ADREFERENCEDTREEVALUEFIELDIDLIST, new ArrayList<Object>());
        setDefaultValue(PROPERTY_ADREFERENCEDTREEDISPLAYFIELDIDLIST, new ArrayList<Object>());
    }

    @Override
    public String getEntityName() {
        return ENTITY_NAME;
    }

    public String getId() {
        return (String) get(PROPERTY_ID);
    }

    public void setId(String id) {
        set(PROPERTY_ID, id);
    }

    public ReferencedTree getRefTree() {
        return (ReferencedTree) get(PROPERTY_REFTREE);
    }

    public void setRefTree(ReferencedTree refTree) {
        set(PROPERTY_REFTREE, refTree);
    }

    public Client getClient() {
        return (Client) get(PROPERTY_CLIENT);
    }

    public void setClient(Client client) {
        set(PROPERTY_CLIENT, client);
    }

    public Organization getOrganization() {
        return (Organization) get(PROPERTY_ORGANIZATION);
    }

    public void setOrganization(Organization organization) {
        set(PROPERTY_ORGANIZATION, organization);
    }

    public Module getModule() {
        return (Module) get(PROPERTY_MODULE);
    }

    public void setModule(Module module) {
        set(PROPERTY_MODULE, module);
    }

    public String getName() {
        return (String) get(PROPERTY_NAME);
    }

    public void setName(String name) {
        set(PROPERTY_NAME, name);
    }

    public String getProperty() {
        return (String) get(PROPERTY_PROPERTY);
    }

    public void setProperty(String property) {
        set(PROPERTY_PROPERTY, property);
    }

    public Boolean isCentralMaintenance() {
        return (Boolean) get(PROPERTY_CENTRALMAINTENANCE);
    }

    public void setCentralMaintenance(Boolean centralMaintenance) {
        set(PROPERTY_CENTRALMAINTENANCE, centralMaintenance);
    }

    public Boolean isSort() {
        return (Boolean) get(PROPERTY_SORT);
    }

    public void setSort(Boolean sort) {
        set(PROPERTY_SORT, sort);
    }

    public Boolean isFilter() {
        return (Boolean) get(PROPERTY_FILTER);
    }

    public void setFilter(Boolean filter) {
        set(PROPERTY_FILTER, filter);
    }

    public Boolean isSearchinsuggestionbox() {
        return (Boolean) get(PROPERTY_SEARCHINSUGGESTIONBOX);
    }

    public void setSearchinsuggestionbox(Boolean searchinsuggestionbox) {
        set(PROPERTY_SEARCHINSUGGESTIONBOX, searchinsuggestionbox);
    }

    public Boolean isShowingrid() {
        return (Boolean) get(PROPERTY_SHOWINGRID);
    }

    public void setShowingrid(Boolean showingrid) {
        set(PROPERTY_SHOWINGRID, showingrid);
    }

    public Long getRecordSortNo() {
        return (Long) get(PROPERTY_RECORDSORTNO);
    }

    public void setRecordSortNo(Long recordSortNo) {
        set(PROPERTY_RECORDSORTNO, recordSortNo);
    }

    public Boolean isActive() {
        return (Boolean) get(PROPERTY_ACTIVE);
    }

    public void setActive(Boolean active) {
        set(PROPERTY_ACTIVE, active);
    }

    public Date getCreationDate() {
        return (Date) get(PROPERTY_CREATIONDATE);
    }

    public void setCreationDate(Date creationDate) {
        set(PROPERTY_CREATIONDATE, creationDate);
    }

    public User getCreatedBy() {
        return (User) get(PROPERTY_CREATEDBY);
    }

    public void setCreatedBy(User createdBy) {
        set(PROPERTY_CREATEDBY, createdBy);
    }

    public Date getUpdated() {
        return (Date) get(PROPERTY_UPDATED);
    }

    public void setUpdated(Date updated) {
        set(PROPERTY_UPDATED, updated);
    }

    public User getUpdatedBy() {
        return (User) get(PROPERTY_UPDATEDBY);
    }

    public void setUpdatedBy(User updatedBy) {
        set(PROPERTY_UPDATEDBY, updatedBy);
    }

    public Boolean isShowinpicklist() {
        return (Boolean) get(PROPERTY_SHOWINPICKLIST);
    }

    public void setShowinpicklist(Boolean showinpicklist) {
        set(PROPERTY_SHOWINPICKLIST, showinpicklist);
    }

    @SuppressWarnings("unchecked")
    public List<ReferencedTree> getADReferencedTreeValuefieldIDList() {
      return (List<ReferencedTree>) get(PROPERTY_ADREFERENCEDTREEVALUEFIELDIDLIST);
    }

    public void setADReferencedTreeValuefieldIDList(List<ReferencedTree> aDReferencedTreeValuefieldIDList) {
        set(PROPERTY_ADREFERENCEDTREEVALUEFIELDIDLIST, aDReferencedTreeValuefieldIDList);
    }

    @SuppressWarnings("unchecked")
    public List<ReferencedTree> getADReferencedTreeDisplayfieldIDList() {
      return (List<ReferencedTree>) get(PROPERTY_ADREFERENCEDTREEDISPLAYFIELDIDLIST);
    }

    public void setADReferencedTreeDisplayfieldIDList(List<ReferencedTree> aDReferencedTreeDisplayfieldIDList) {
        set(PROPERTY_ADREFERENCEDTREEDISPLAYFIELDIDLIST, aDReferencedTreeDisplayfieldIDList);
    }

}
